import request from '../utils/request.js'
import service from '../utils/request2.js'
//账号密码注册
export const registerApi = (data) => request({
	url: '/api/user/register',
	method:'post',
	data
})

//账号密码登录
export const loginApi = (data) => request({
	url: '/api/user/login',
	method:'post',
	data
})

//微信一键登录
export const loginByWixin = (data) => request({
	url:'/api/user/login/weixin',
	method:'post',
	data
})

//根据id获取用户信息
export const getUserInfoById = (data) => request({
	url:'/api/user/search/id',
	method:'get',
	data
})

//修改头像
export const changeAvatar = (data) => service({
	url:'/api/user/update/avatar',
	method:'post',
	data
})

//修改用户信息
export const modifyUserInfo = (data) => request({
	url:'/api/user/update',
	method:'post',
	data
})

//根据id获取关注的人列表
export const getFocusList = (data) => request({
	url:'/api/user/focus/list',
	method:'get',
	data
})

//取消关注
export const calcelFocus = (data) => request({
	url:'/api/user/unfocus',
	method:'post',
	data
})

//点击关注
export const clickFocus = (data) => request({
	url:'/api/user/focus',
	method:'post',
	data
})
//随机获取用户
export const getUserByRandom = () => request({
	url:'/api/user/random',
	method:'get'
})

